package com.jiangyao.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 日志表
 * </p>
 *
 * @author yangyongchuan
 * @since 2020-07-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysLog extends Model<SysLog> {
	private static final long serialVersionUID = 353988918485366628L;
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	private Long userId;

	/**
	 * 访问链接
	 */
	private String url;

	/**
	 * 请求参数
	 */
	private String request;

	/**
	 * 响应内容
	 */
	private String response;

	/**
	 * ip地址
	 */
	private String ip;

	/**
	 * 执行时间
	 */
	private Integer runtime;

	/**
	 * 创建时间
	 */
	private Date createTime;


	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
